package com.gagakuai.adapter.api;

import java.io.*;

/*
 * @program: common-starters
 * @description: 拼写检查器
 * @author: houhong
 * @create: 2023-04-07 20:44
 */
public class SpellChecker {


    private Lexicon dictionary = null;

    /*
     * 字典注入
     */
    public SpellChecker(Lexicon lexicon) {
        this.dictionary = lexicon;
    }




    private static int BUFFER_SIZE = 10;

    static void copy(String src, String dst) {
        try (InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst)) {
            byte[] buf = new byte[BUFFER_SIZE];
            int n;
            while ((n = in.read(buf)) >= 0) out.write(buf, 0, n);
        } catch (Exception e) {

        }
    }
}